<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>vue9-12</title>
</head>
<body>
	<div id="app">
		<ele></ele>
		<ele><p>slot的内容</p></ele>
	</div>
	<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
	<script>
		Vue.component('ele',{
			render:function(createElement){
				if( this.$slots.default === undefined ){
					return createElement('p','没有使用slot时显示的文本')
				}else{
					return createElement('div',this.$slots.default)
				}
			}
		})
		var app = new Vue({
			el:'#app'
		})
	</script>
</body>
</html>